﻿using System;
using System.Collections.Generic;
using SharpSqlAnalyzer.nodes.hive;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x0200027B RID: 635
	public class TAlterViewSqlNode : TParseTreeNode
	{
		// Token: 0x170003A5 RID: 933
		// (get) Token: 0x0600145D RID: 5213 RVA: 0x00324CF1 File Offset: 0x00322EF1
		public virtual TSelectSqlNode SelectSqlNode
		{
			get
			{
				return this._selectSqlNode;
			}
		}

		// Token: 0x170003A6 RID: 934
		// (get) Token: 0x0600145E RID: 5214 RVA: 0x00324CF9 File Offset: 0x00322EF9
		public virtual List<TPartitionExtensionClause> PartitionSpecs
		{
			get
			{
				return this._partitionSpecs;
			}
		}

		// Token: 0x170003A7 RID: 935
		// (get) Token: 0x0600145F RID: 5215 RVA: 0x00324D01 File Offset: 0x00322F01
		public virtual TObjectName ViewName
		{
			get
			{
				return this._viewName;
			}
		}

		// Token: 0x06001460 RID: 5216 RVA: 0x00324D09 File Offset: 0x00322F09
		public override void init(object arg1, object arg2)
		{
			this._alterViewOption = (EAlterViewOption)arg1;
			this._viewName = (TObjectName)arg2;
			this._viewName.DbObjectType = EDbObjectType.view;
		}

		// Token: 0x170003A8 RID: 936
		// (get) Token: 0x06001461 RID: 5217 RVA: 0x00324D30 File Offset: 0x00322F30
		public virtual EAlterViewOption AlterViewOption
		{
			get
			{
				return this._alterViewOption;
			}
		}

		// Token: 0x170003A9 RID: 937
		// (get) Token: 0x06001462 RID: 5218 RVA: 0x00324D38 File Offset: 0x00322F38
		public virtual TObjectName NewViewName
		{
			get
			{
				return this._newViewName;
			}
		}

		// Token: 0x170003AA RID: 938
		// (get) Token: 0x06001463 RID: 5219 RVA: 0x00324D40 File Offset: 0x00322F40
		public virtual List<THiveKeyValueProperty> TableProperties
		{
			get
			{
				return this._tableProperties;
			}
		}

		// Token: 0x06001464 RID: 5220 RVA: 0x00324D48 File Offset: 0x00322F48
		public override void init(object arg1, object arg2, object arg3)
		{
			this.init(arg1, arg2);
			switch (this._alterViewOption)
			{
			case EAlterViewOption.setTableProperties:
				this._tableProperties = (List<THiveKeyValueProperty>)arg3;
				return;
			case EAlterViewOption.unsetTableProperties:
				break;
			case EAlterViewOption.rename:
				this._newViewName = (TObjectName)arg3;
				return;
			case EAlterViewOption.addPartitionSpecs:
				this._partitionSpecs = (List<TPartitionExtensionClause>)arg3;
				return;
			case EAlterViewOption.dropPartitionSpecs:
				this._partitionSpecs = (List<TPartitionExtensionClause>)arg3;
				return;
			case EAlterViewOption.asSelect:
				this._selectSqlNode = (TSelectSqlNode)arg3;
				break;
			default:
				return;
			}
		}

		// Token: 0x040016D2 RID: 5842
		private TObjectName _viewName;

		// Token: 0x040016D3 RID: 5843
		private EAlterViewOption _alterViewOption;

		// Token: 0x040016D4 RID: 5844
		private TObjectName _newViewName;

		// Token: 0x040016D5 RID: 5845
		private List<TPartitionExtensionClause> _partitionSpecs;

		// Token: 0x040016D6 RID: 5846
		private TSelectSqlNode _selectSqlNode;

		// Token: 0x040016D7 RID: 5847
		private List<THiveKeyValueProperty> _tableProperties;
	}
}
